package com.ruoyi.pangolin.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pangolin.mapper.SysPangolinIndustryMapper;
import com.ruoyi.pangolin.domain.SysPangolinIndustry;
import com.ruoyi.pangolin.service.ISysPangolinIndustryService;

/**
 * 行业类型Service业务层处理
 * 
 * @author wholve
 * @date 2023-01-22
 */
@Service
public class SysPangolinIndustryServiceImpl implements ISysPangolinIndustryService 
{
    @Autowired
    private SysPangolinIndustryMapper sysPangolinIndustryMapper;

    /**
     * 查询行业类型
     * 
     * @param id 行业类型主键
     * @return 行业类型
     */
    @Override
    public SysPangolinIndustry selectSysPangolinIndustryById(Long id)
    {
        return sysPangolinIndustryMapper.selectSysPangolinIndustryById(id);
    }

    /**
     * 查询行业类型列表
     * 
     * @param sysPangolinIndustry 行业类型
     * @return 行业类型
     */
    @Override
    public List<SysPangolinIndustry> selectSysPangolinIndustryList(SysPangolinIndustry sysPangolinIndustry)
    {
        return sysPangolinIndustryMapper.selectSysPangolinIndustryList(sysPangolinIndustry);
    }

    /**
     * 新增行业类型
     * 
     * @param sysPangolinIndustry 行业类型
     * @return 结果
     */
    @Override
    public int insertSysPangolinIndustry(SysPangolinIndustry sysPangolinIndustry)
    {
        sysPangolinIndustry.setCreateTime(DateUtils.getNowDate());
        return sysPangolinIndustryMapper.insertSysPangolinIndustry(sysPangolinIndustry);
    }

    /**
     * 修改行业类型
     * 
     * @param sysPangolinIndustry 行业类型
     * @return 结果
     */
    @Override
    public int updateSysPangolinIndustry(SysPangolinIndustry sysPangolinIndustry)
    {
        sysPangolinIndustry.setUpdateTime(DateUtils.getNowDate());
        return sysPangolinIndustryMapper.updateSysPangolinIndustry(sysPangolinIndustry);
    }

    /**
     * 批量删除行业类型
     * 
     * @param ids 需要删除的行业类型主键
     * @return 结果
     */
    @Override
    public int deleteSysPangolinIndustryByIds(Long[] ids)
    {
        return sysPangolinIndustryMapper.deleteSysPangolinIndustryByIds(ids);
    }

    /**
     * 删除行业类型信息
     * 
     * @param id 行业类型主键
     * @return 结果
     */
    @Override
    public int deleteSysPangolinIndustryById(Long id)
    {
        return sysPangolinIndustryMapper.deleteSysPangolinIndustryById(id);
    }
}
